﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CreateAgent.aspx.cs" Inherits="Xyz.Web.Admin.Agent.CreateAgent" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript" language="javascript">
    $(function () {
        $("#" + "<%= txtDob.ClientID %>").datepicker({
            dateFormat: 'dd-M-yy',
            changeMonth: true,
            changeYear: true,
            showButtonPanel: false,
            closeText: 'Close',
            showOn: 'both',
            buttonImage: '/Images/calendar.gif',
            buttonImageOnly: true
        });

        $('img.ui-datepicker-trigger').css({ margin: '0px 0px -5px -18px' });
    });

</script>
    <h2>New Agent</h2>
    <br />
    <fieldset>
    <table style="width: 100%">
        <tr>
            <td width="120px">
                User Name : *</td>
            <td width="210px">
                <asp:TextBox ID="txtUsername" runat="server" Width="200px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtUsername" ErrorMessage="Please enter user name" 
                    ForeColor="#CC0000"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Password : *</td>
            <td>
                <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="txtPassword" ErrorMessage="Please enter password" 
                    ForeColor="#CC0000"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Confirm Password : *</td>
            <td>
                <asp:TextBox ID="txtConfirmPassword" runat="server" TextMode="Password" 
                    Width="200px"></asp:TextBox>
            </td>
            <td>
                <asp:CompareValidator ID="CompareValidator1" runat="server" 
                    ControlToCompare="txtPassword" ControlToValidate="txtConfirmPassword" 
                    ErrorMessage="Passwords does not match" ForeColor="#CC0000"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td>
                First Name : *</td>
            <td>
                <asp:TextBox ID="txtFirstName" runat="server" Width="200px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtFirstName" ErrorMessage="Please enter first name" 
                    ForeColor="#CC0000"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Last Name : *</td>
            <td>
                <asp:TextBox ID="txtLastName" runat="server" Width="200px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txtLastName" ErrorMessage="Please enter last name" 
                    ForeColor="#CC0000"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Gender : *</td>
            <td>
                <asp:RadioButton ID="rdbMale" runat="server" Checked="True" GroupName="Gender" 
                    Text="Male" />
                <asp:RadioButton ID="rdbFemale" runat="server" GroupName="Gender" 
                    Text="Female" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td valign="top">
                Date of Birth : *</td>
            <td>
                <asp:TextBox ID="txtDob" runat="server" Width="200px"></asp:TextBox>
&nbsp;</td>
            <td valign="top">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="txtDob" ErrorMessage="Please select date of birth" 
                    ForeColor="#CC0000"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td valign="top">
                Company Name : *</td>
            <td>
                <asp:TextBox ID="txtCompanyName" runat="server"></asp:TextBox>
            </td>
            <td valign="top">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ControlToValidate="txtCompanyName" ErrorMessage="Please enter company name" 
                    ForeColor="#CC0000"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td valign="top">
                Discount Rate : *</td>
            <td>
                <asp:TextBox ID="txtDiscountRate" runat="server"></asp:TextBox>
            </td>
            <td valign="top">
                <asp:RangeValidator ID="RangeValidator1" runat="server" 
                    ControlToValidate="txtDiscountRate" 
                    ErrorMessage="Discount rate should be between 0.0 to 100.0" ForeColor="#CC0000" 
                    MaximumValue="100" MinimumValue="0"></asp:RangeValidator>
            </td>
        </tr>
        </table>
    </fieldset>
    <asp:Button ID="btnSubmit" runat="server" Text="  Create  " 
        onclick="btnSubmit_Click" CssClass="yellow_button" />
        <br />
        <br />
</asp:Content>
